import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        city: '北京',
    },
    getters: {},
    actions: {
        changeCity(context, city_name) {
            context.commit('changeCity', city_name);
        }
    },
    mutations: {
        changeCity(state, city_name) {
            state.city = city_name;
        }
    },

    modules: {}
})